import requests from './index.js'

export const reqFirstCategorys = ()=> requests({url:'/api/course/category/getFirstCategorys',method:'get'});

export const reqSecondCategorys = (params)=> requests({url:'/api/course/category/getSecondCategorys',params,method:'get'});


export const reqcoursedetail = (data)=> requests({url:'/api/course/tags/list',data,method:'post'});


export const reqcoursesearch = (data)=> requests({url:'/api/course/search',data,method:'post'});

export const reqbanner = ()=> requests({url:'/api/slider/getSliders',method:'get'});

export const reqnewcrouse = (data)=> requests({url:'/api/course/mostNew',data,method:'post'});

export const searchCourse = (data)=> requests({url:'/api/course/search',data,method:'post'});

export const reqlogin = (data)=> requests({url:'/api/u/loginByJson',data,method:'post'});

export const reqCoursedatail = (params)=> requests({url:'/api/course/getDetail',params,method:'get'});

export const reqlogincode = (params)=> requests({url:'/api/sms/sendRegisterOrLoginCaptcha',params,method:'get'});

export const requserinfo = (params)=> requests({url:'/api/member/getInfo',params,method:'get'});

export const reqphonelogin = (data)=> requests({url:'/api/u/loginByMobile',data,method:'post'});

export const createtoken = ()=> requests({url:'/api/token/createToken',method:'get'});


export const reqlogout = ()=> requests({url:'/api/u/logout',method:'get'});

export const courseCheckAuth = (params)=> requests({url:'/api/course/checkAuth',params,method:'get'});

export const downloadAttachment = (params)=> requests({url:'/api/course/downloadAttachment',params,responseType: 'blob',method:'get'});

export const reqcourseplay = (params)=> requests({url:'/api/player/play',params,method:'get'});

export const reqshopcart = ()=> requests({url:'/api/shopcar/getShopCarList',method:'get'});


export const reqaddshopcart = (data)=> requests({url:'/api/shopcar/addShopCar',data,method:'get'});

export const reqconfirg = (data)=> requests({url:'/api/order/settlement',data,method:'post'});

export const reqzfbpay = (data)=> requests({url:'/api/pay/alipay/createOrder',data,method:'post'});

export const reqzfbpayquery = (params)=> requests({url:'/api/pay/alipay/queryOrder',params,method:'get'});